﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Rpt_Config_Group.aspx.cs" Inherits="H2.NET.Web.Reports.Config_Group" %>
<%@ Register Assembly="H2.NET.Controls" Namespace="H2.NET.Controls" TagPrefix="H2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>工作组设置</title>
    <style type="text/css">       
        .gv_boder{width:100%; margin-top:2px;}
        .gv_boder th{height:20px; background-color:#EDEDED;color:#6C6B6B; text-align:left; font-size: 10pt;font-family:Arial;padding-left:2px;}
        .gv_header{font-size: 20pt; font-family:Arial; color:#6C6B6B;text-decoration: none;}
        .gv_item_alternating_row{height:24px; text-align:left;font-size: 9pt;font-family:Arial; background-color:#F9F9F9;}
        .gv_item_row{height:24px; text-align:left;font-size: 9pt;font-family:Arial}
        .gv_selected_row{height:24px; padding-left:2px;text-align:left;font-size: 9pt;font-family:Arial}
        .gv_pager{}                     
    </style>
    
    <style type="text/css"> 
      .hidden{display:none}
      .show{display:block}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <script type="text/javascript">
        function opt_group(i_type)
        {
            // Save
            if(i_type == "opt_group_add" && confirm("您确认的要保存当前设置吗？"))
            {
                __doPostBack(i_type);
            } 
            
            // Delete
            if(i_type == "opt_group_delete" && confirm("您确认的要删除当前工作组吗？"))
            {
                __doPostBack(i_type,"");
            }                       
        } 
        
	    function winOpenPopup(strURL,str_width,str_height,str_value,str_element,str_postback,str_multiple)
	    {
	        try
	        {
	            var var_time =new Date();
		        var winoption ="dialogWidth="+(parseInt(str_width) + 18)+"px;dialogHeight="+str_height+"px;dialogLeft: status:no; directories:yes;scrollbars:auto;Resizable=yes;";		
		        var tmp=window.showModalDialog(strURL+"&vt="+var_time,'',winoption);
        		
		        if(tmp != null &&  tmp != "" && tmp != undefined)
		        {
		            var o= eval('(' + tmp + ')'); 	
		            
		            //是否多选
		            if(str_multiple == "0")
		            {	        
		                document.getElementById(str_element).value=eval("o." + str_value);
		            }else
		            {
		                document.getElementById(str_element).value = document.getElementById(str_element).value + eval("o." + str_value) + ",";
		            }
    		        
		            //是否Postback
		            if(str_postback == "1")
		            {
		                //document.getElementById(str_element).onchange();
		                __doPostBack(str_element,"change:"  + document.getElementById(str_element).value);
		            }
		        }
		    }catch(e)
		    {
		    }
	    }                    
    </script>
    
    <!------------------------------------------------工作组--------------------------------------------------->
      <div>
        <fieldset style="border:solid 1px #45A1C3; margin:0px 0px 0px 0px;">
           <legend style="font-weight: bold; font-size: 9pt; color: #45A1C3; font-family:Arial">工作组</legend>
           <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td style="width: 6px; height: 48px;">
                        </td>
                    <td style="height: 48px;">
                        <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                            <tr>
                                <td style="width: 80px; height: 26px;">
                                    <font face="Arial" style="font-size: 9pt">编号：</font></td>
                                <td style="height: 26px; width: 442px;">
                                    <H2:Dialog id="txt_grp_no" runat="server" AutoPostBack="true" maxlength="20" ontextchanged="txt_grp_no_TextChanged" width="120px"></H2:Dialog>
                                    &nbsp;
                                    &nbsp; &nbsp;
                                    <asp:Label ID="lbl_information" runat="server" Font-Names="Arial" Font-Size="9pt"
                                        ForeColor="Red" Width="201px"></asp:Label></td>
                                <td style="height: 26px">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 80px; height: 26px;">
                                    <font face="Arial" style="font-size: 9pt">名称：</font></td>
                                <td style="height: 26px; width: 442px;" valign="top">
                                    <asp:TextBox ID="txt_grp_name" runat="server" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" Width="298px" Height="17px" MaxLength="60"></asp:TextBox>
                                    <asp:DropDownList ID="drp_type" runat="server" Width="60px" AutoPostBack="True" OnSelectedIndexChanged="drp_type_SelectedIndexChanged">
                                        <asp:ListItem Value="1">成员</asp:ListItem>
                                        <asp:ListItem Value="2">权限</asp:ListItem>
                                    </asp:DropDownList></td>
                                <td style="height: 26px;" valign="top" align="right">
                                    <asp:Button ID="btn_delete" runat="server" OnClientClick="javascript:opt_group('opt_group_delete');"
                                                    Text="删除" Visible="False" Width="70px" /><font face="Arial" style="font-size: 9pt">&nbsp;</font><asp:Button ID="btn_save" runat="server" OnClientClick="javascript:opt_group('opt_group_add');"
                                                    Text="保存" Width="70px" /></td>
                            </tr>
                            <tr>
                                <td style="width: 80px; height: 5px">
                                </td>
                                <td style="height: 5px; width: 442px;">
                                </td>
                                <td style="height: 5px">
                                </td>
                            </tr>
                        </table>
                        </td>
                    <td style="width: 6px; height: 48px;">
                        </td>
                </tr>
           </table>
         </fieldset>
    </div>
    
    <!------------------------------------------------成员设置--------------------------------------------------->
    <div>
        <fieldset style="border:solid 1px #45A1C3; margin:0px 0px 0px 0px;">
           <legend style="font-weight: bold; font-size: 9pt; color: #45A1C3; font-family:Arial">成员设置</legend>
           <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td style="width: 6px; height: 48px;">
                        </td>
                    <td style="height: 48px; ">                     
                      <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                        <tr>
                          <td style="width:80px; height: 16px;"><span style="font-size: 9pt; font-family: Arial">类别：</span></td>
                            <td colspan="2" style="height: 16px">
                              <asp:DropDownList ID="drp_field" runat="server" Width="86px" AutoPostBack="True" OnSelectedIndexChanged="drp_field_SelectedIndexChanged">
                              </asp:DropDownList>
                              <asp:TextBox ID="txt_search" runat="server" MaxLength="8" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" Width="152px" Height="17px"></asp:TextBox><font color="#666666" face="Arial" style="font-size: 9pt">&nbsp;</font>
                              <asp:DropDownList ID="drp_resource" Width="197px" runat="server" Visible="False" OnSelectedIndexChanged="drp_resource_SelectedIndexChanged" AutoPostBack="True">
                              </asp:DropDownList><span style="font-size: 9pt; font-family: Arial"></span>
                                <asp:Button ID="btn_serach" runat="server" Text="过滤" OnClick="btn_serach_Click" />
                            </td>
                          <td style="width: 300px; height: 16px">
                              <asp:Label ID="lbl_type" runat="server" Width="50px" Font-Names="Arial" Font-Size="9pt"></asp:Label>
                          </td>
                        </tr>
                        
                        <tr>
                          <td style="height: 19px; width: 80px;"></td>
                          <td style="border-right: #45A1C3 1px solid; border-top: #45A1C3 1px solid; border-left: #45A1C3 1px solid; border-bottom: #45A1C3 1px solid; width:300px" align="left" valign="top" >
                              <!------------------------------------类型成员------------------------------------>
                                    <asp:GridView ID="gv_field" runat="server" AllowSorting="True" BorderColor="#45A1C3" BorderStyle="None" BorderWidth="0px" AutoGenerateColumns="False" CssClass="gv_boder" PageSize="20" AllowPaging="True">
                                        <RowStyle CssClass="gv_item_row" />
                                        <AlternatingRowStyle CssClass="gv_item_alternating_row" />
                                        <SelectedRowStyle CssClass="gv_selected_row" />
                                        <PagerStyle CssClass="gv_pager" />
                                        <Columns>
                                        
                                        <asp:BoundField DataField="grp_src_type">
                                            <HeaderStyle CssClass="hidden" Width="0px" />
                                            <ItemStyle CssClass="hidden" Width="0px" />
                                        </asp:BoundField>
                                        
                                        <asp:BoundField DataField="grp_src_type_v">
                                            <HeaderStyle CssClass="hidden" Width="0px" />
                                            <ItemStyle CssClass="hidden" Width="0px" />
                                        </asp:BoundField>
                                            
                                        <asp:TemplateField HeaderText="CheckBox">
                                            <ItemTemplate>
                                                <font color="#666666" face="Arial" style="font-size: 2pt">&nbsp;</font><asp:CheckBox ID="chk_items" runat="server"/>
                                            </ItemTemplate> 
                                            <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Center" Width="20px" />                                    
                                            <HeaderTemplate>                                                    
                                                <asp:CheckBox ID="chk_gv_field_all" runat="server"  OnCheckedChanged="chk_gv_field_all_CheckedChanged" AutoPostBack="True"/>
                                            </HeaderTemplate>                                                                        
                                            <HeaderStyle Width="10px" HorizontalAlign="Center" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" ForeColor="#6C6B6B" />
                                        </asp:TemplateField>                                             
                                       
                                        <asp:BoundField DataField="grp_src_type_n" HeaderText="名称">
                                            <HeaderStyle Font-Bold="False" Font-Names="Arial" Font-Overline="False" Font-Size="9pt"
                                                Font-Underline="False" ForeColor="#6C6B6B" />
                                            <ItemStyle ForeColor="#6C6B6B" HorizontalAlign="Left" />
                                        </asp:BoundField>
                                                                                         
                                        </Columns>
                                        <PagerTemplate>
                                        </PagerTemplate>
                                    </asp:GridView>                                     
                                    <div id="info">
                                      <asp:Table ID="tblPager" runat="server" Height="20px" Width="100%">
                                          <asp:TableRow ID="TableRow1" runat="server" Height="20px">
                                              <asp:TableCell ID="TableCell1" runat="server" Height="20px" Font-Size="9pt" ForeColor="#6C6B6B"><font color="#666666" face="Arial" style="font-size: 9pt">页次:&nbsp;</font>
                                              <asp:Label ID="lblPageCurrent" runat="server" Text="1"></asp:Label>/<asp:Label ID="lblPageCount" runat="server" Text="1"></asp:Label><font color="#666666" face="Arial" style="font-size: 9pt">&nbsp;&nbsp;共</font>
                                              <asp:Label ID="lblPageRow" runat="server" Text="0"></asp:Label><font color="#666666" face="Arial" style="font-size: 9pt"> 条记录 </font>
                                              </asp:TableCell>
                                          </asp:TableRow>
                                          <asp:TableRow ID="TableRow2" runat="server" Height="20px">
                                              <asp:TableCell ID="TableCell2" runat="server" HorizontalAlign="Left" Font-Size="9pt" ForeColor="#6C6B6B"><font color="#666666" face="Arial" style="font-size: 9pt">导航:&nbsp;</font>
                                              <asp:LinkButton ID="btnFirst" runat="server" CssClass="link" CommandName="Pager" CommandArgument="First" OnCommand="NavigateToPage"><font color="#666666" face="Arial" style="font-size: 9pt;">首页</font></asp:LinkButton>&nbsp;
                                              <asp:LinkButton ID="btnPrev" runat="server" CssClass="link" CommandName="Pager" CommandArgument="Prev" OnCommand ="NavigateToPage"><font color="#666666" face="Arial" style="font-size: 9pt">前一页</font></asp:LinkButton>&nbsp;
                                              <asp:LinkButton ID="btnNext" runat="server" CssClass="link" CommandName="Pager" CommandArgument="Next" OnCommand="NavigateToPage"><font color="#666666" face="Arial" style="font-size: 9pt">后一页</font></asp:LinkButton>&nbsp;
                                              <asp:LinkButton ID="btnLast" runat="server" CssClass="link" CommandName="Pager" CommandArgument="Last" OnCommand="NavigateToPage"><font color="#666666" face="Arial" style="font-size: 9pt">尾页</font></asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;                                          
                                              </asp:TableCell>
                                          </asp:TableRow>
                                      </asp:Table>
                                    </div>
                          </td>
                          <td style="width: 70px; height: 19px; vertical-align:middle;" align="center">
                               <table style="width: 100%" border="0" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td style="height: 17px">
                                                </td>
                                        </tr>                                        
                                        <tr>
                                            <td style="height: 31px;" align="center"><asp:Button ID="btn_add_all" runat="server" Font-Names="Arial" Font-Size="9pt" Text="全部增加"
                                                    Width="64px" Visible="False" /></td>
                                        </tr>
                                        
                                        <tr>
                                            <td style="height: 30px" align="center"><asp:Button ID="btn_add" runat="server" Font-Names="Arial" Font-Size="9pt" Text="增加 >>"
                                                    Width="64px" OnClick="btn_add_Click" /></td>
                                        </tr>                                                                                
                                        <tr>
                                            <td style="height: 30px" align="center">
                                                <asp:Button ID="btn_remove" runat="server" Font-Names="Arial" Font-Size="9pt" Text="<< 移除"
                                                    Width="64px" OnClick="btn_remove_Click" /></td>
                                        </tr>
                                        <tr>
                                            <td style="height: 30px" align="center">
                                                <asp:Button ID="btn_remove_all" runat="server" Font-Names="Arial" Font-Size="9pt" Text="全部移除"
                                                    Width="64px" Visible="False" /></td>
                                        </tr>
                                        <tr>
                                            <td style="height: 30px">
                                                　</td>
                                        </tr>
                                </table>
                          </td>
                          <td style="border-right: #45A1C3 1px solid; border-top: #45A1C3 1px solid;
                                    border-left: #45A1C3 1px solid; border-bottom: #45A1C3 1px solid; width:204px"
                                    valign="top">
                              <asp:GridView ID="gv_grp_f_m_field" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                        BorderColor="#45A1C3" BorderStyle="None" BorderWidth="0px" CssClass="gv_boder"
                                        GridLines="Both" PageSize="20" AllowPaging="True">
                                    <RowStyle CssClass="gv_item_row" />
                                    <Columns>
                                        <asp:BoundField DataField="grp_f_m_type">
                                            <HeaderStyle CssClass="hidden" Width="0px" />
                                            <ItemStyle CssClass="hidden" Width="0px" />
                                        </asp:BoundField>
                                        
                                        <asp:BoundField DataField="grp_f_m_type_v">
                                            <HeaderStyle CssClass="hidden" Width="0px" />
                                            <ItemStyle CssClass="hidden" Width="0px" />
                                        </asp:BoundField>
                                                                                
                                        <asp:TemplateField HeaderText="CheckBox">
                                            <HeaderTemplate>                                                
                                                <asp:CheckBox ID="chk_grp_f_m_field_all" runat="server" OnCheckedChanged="chk_grp_f_m_field_all_CheckedChanged" AutoPostBack="True" />
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <font color="#666666" face="Arial" style="font-size: 2pt">&nbsp;</font><asp:CheckBox ID="chk_grp_f_m_field" runat="server"/>
                                            </ItemTemplate> 
                                            <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Center" Width="20px" />                   
                                            <HeaderStyle Width="10px" HorizontalAlign="Center" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" ForeColor="#6C6B6B" />                                            
                                        </asp:TemplateField>

                                        <asp:BoundField DataField="grp_f_m_type_name" HeaderText="类型">
                                            <ItemStyle ForeColor="#6C6B6B" HorizontalAlign="Left"  Width="30px" />
                                            <HeaderStyle Font-Bold="False" Font-Names="Arial" Font-Overline="False" Font-Size="9pt"
                                                Font-Underline="False" ForeColor="#6C6B6B" Width="30px"  />
                                        </asp:BoundField>                                        
                                       
                                        <asp:BoundField DataField="grp_f_m_type_n" HeaderText="名称">
                                            <HeaderStyle Font-Bold="False" Font-Names="Arial" Font-Overline="False" Font-Size="9pt"
                                                    Font-Underline="False" ForeColor="#6C6B6B" />
                                            <ItemStyle ForeColor="#6C6B6B" HorizontalAlign="Left" />
                                        </asp:BoundField>  
                                    </Columns>
                                    <PagerTemplate>
                                    </PagerTemplate>
                                    <PagerStyle CssClass="gv_pager" />
                                    <SelectedRowStyle CssClass="gv_selected_row" />
                                    <AlternatingRowStyle CssClass="gv_item_alternating_row" />
                                </asp:GridView>
                                      <asp:Table ID="Table1" runat="server" Height="20px" Width="100%">
                                          <asp:TableRow ID="TableRow3" runat="server" Height="20px">
                                              <asp:TableCell ID="TableCell3" runat="server" Height="20px" Font-Size="9pt" ForeColor="#6C6B6B"><font color="#666666" face="Arial" style="font-size: 9pt">页次:&nbsp;</font>
                                              <asp:Label ID="lblPageCurrent_2" runat="server" Text="1"></asp:Label>/<asp:Label ID="lblPageCount_2" runat="server" Text="1"></asp:Label><font color="#666666" face="Arial" style="font-size: 9pt">&nbsp;&nbsp;共</font>
                                              <asp:Label ID="lblPageRow_2" runat="server" Text="0"></asp:Label><font color="#666666" face="Arial" style="font-size: 9pt"> 条记录 </font>
                                              </asp:TableCell>
                                          </asp:TableRow>
                                          <asp:TableRow ID="TableRow4" runat="server" Height="20px">
                                              <asp:TableCell ID="TableCell4" runat="server" HorizontalAlign="Left" Font-Size="9pt" ForeColor="#6C6B6B"><font color="#666666" face="Arial" style="font-size: 9pt">导航:&nbsp;</font>
                                              <asp:LinkButton ID="btnFirst_2" runat="server" CssClass="link" CommandName="Pager" CommandArgument="First_2" OnCommand="NavigateToPage"><font color="#666666" face="Arial" style="font-size: 9pt;">首页</font></asp:LinkButton>&nbsp;
                                              <asp:LinkButton ID="btnPrev_2" runat="server" CssClass="link" CommandName="Pager" CommandArgument="Prev_2" OnCommand ="NavigateToPage"><font color="#666666" face="Arial" style="font-size: 9pt">前一页</font></asp:LinkButton>&nbsp;
                                              <asp:LinkButton ID="btnNext_2" runat="server" CssClass="link" CommandName="Pager" CommandArgument="Next_2" OnCommand="NavigateToPage"><font color="#666666" face="Arial" style="font-size: 9pt">后一页</font></asp:LinkButton>&nbsp;
                                              <asp:LinkButton ID="btnLast_2" runat="server" CssClass="link" CommandName="Pager" CommandArgument="Last_2" OnCommand="NavigateToPage"><font color="#666666" face="Arial" style="font-size: 9pt">尾页</font></asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp;                                          
                                              </asp:TableCell>
                                          </asp:TableRow>
                                      </asp:Table>
                            </td>
                            <td>&nbsp;</td>
                        </tr>
                                                
                      </table>
                    
                    </td>
                    <td style="width: 6px; height: 48px;">
                        </td>
                </tr>
           </table>
         </fieldset>
    </div>
       
    </form>
</body>
</html>
